//秒杀活动
import request from '@/utils/request'

//修改秒杀活动状态 @GetMapping("/api/flashActivity/change/{flashActivityId}/{flashActivityState}")
export const reqChangeFlashActivity = (flashActivityId,flashActivityState)=>request({url:`/flashActivity/change/${flashActivityId}/${flashActivityState}`,method:'get'});

//获取秒杀活动  @GetMapping("/api/buyer/flashActivity/{page}/{limit}/{sellerId}")
export const reqFlashActivityList = (page,limit,sellerId) => {
    if (sellerId === "admin") {
        return request({ url: `/flashActivity/${page}/${limit}`, method: 'get' });
    } else {
        return request({ url: `/buyer/flashActivity/${page}/${limit}/${sellerId}`, method: 'get'});
    }
}